# Copyright (C) 2018 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("//tools/build:rules.bzl", "go_stripped_binary")

go_library(
    name = "go_default_library",
    srcs = [
        "benchmark.go",
        "coarse_profile.go",
        "commands.go",
        "common.go",
        "create_graph_visualization.go",
        "devices.go",
        "dump.go",
        "dump_fbo.go",
        "dump_pipeline.go",
        "dump_replay.go",
        "dump_shaders.go",
        "export_replay.go",
        "flags.go",
        "framegraph.go",
        "inputs.go",
        "main.go",
        "make_doc.go",
        "memory.go",
        "packages.go",
        "perfetto.go",
        "profile.go",
        "replace_resource.go",
        "report.go",
        "screenshot.go",
        "server_performance.go",
        "split.go",
        "state.go",
        "status.go",
        "stresstest.go",
        "sxs_video.go",
        "trace.go",
        "trim.go",
        "trim_state.go",
        "unpack.go",
        "validate_gpu_profiling.go",
        "video.go",
    ],
    importpath = "github.com/google/gapid/cmd/gapit",
    visibility = ["//visibility:private"],
    deps = [
        "//core/app:go_default_library",
        "//core/app/auth:go_default_library",
        "//core/app/crash:go_default_library",
        "//core/app/flags:go_default_library",
        "//core/app/layout:go_default_library",
        "//core/app/status:go_default_library",
        "//core/data/endian:go_default_library",
        "//core/data/id:go_default_library",
        "//core/data/pack:go_default_library",
        "//core/data/protoutil:go_default_library",
        "//core/event/task:go_default_library",
        "//core/image:go_default_library",
        "//core/image/font:go_default_library",
        "//core/log:go_default_library",
        "//core/math/f32:go_default_library",
        "//core/math/sint:go_default_library",
        "//core/os/android/adb:go_default_library",
        "//core/os/device:go_default_library",
        "//core/os/device/bind:go_default_library",
        "//core/os/device/host:go_default_library",
        "//core/os/device/remotessh:go_default_library",
        "//core/os/file:go_default_library",
        "//core/os/shell:go_default_library",
        "//core/stream/fmts:go_default_library",
        "//core/text/reflow:go_default_library",
        "//core/video:go_default_library",
        "//gapir/replay_service:go_default_library",
        "//gapis/api:go_default_library",
        "//gapis/client:go_default_library",
        "//gapis/memory:go_default_library",
        "//gapis/replay/opcode:go_default_library",
        "//gapis/service:go_default_library",
        "//gapis/service/memory_box:go_default_library",
        "//gapis/service/path:go_default_library",
        "//gapis/service/types:go_default_library",
        "//gapis/stringtable:go_default_library",
        "//gapis/vertex:go_default_library",
        "//tools/build/third_party/perfetto:config_go_proto",
        "@com_github_golang_protobuf//jsonpb:go_default_library_gen",
        "@com_github_golang_protobuf//proto:go_default_library",
    ],
)

go_stripped_binary(
    name = "gapit",
    data = [
        "//cmd/gapis",
        "//gapis/messages:stb",
    ],
    embed = [":go_default_library"],
    visibility = ["//visibility:public"],
)
